home *** CD-ROM | disk | FTP | other *** search
/ Know Your Hockey - The Greatest Player Resource / Know Your Hockey: The Greatest Player Resource.iso / hockey / director / ssqcst.cst / 00031_Script_Load Media Scripts < prev    next >
Text File  |  1998-09-28  |  5KB  |  168 lines

  1. global gMediaList, gTheBench,gButtonState,gXCast,gPrompts
  2.  
  3. --- this script uses the sprite channel location of the clickon button (6 to 11)
  4. -- if the player positions are moved then change the script to reflect this
  5.  
  6. on player
  7.   cursor 4
  8.   -- clear the player card and control sprites
  9.   repeat with x = 5 to 10
  10.     set the type of sprite x = 0
  11.   end repeat
  12.   set the type of sprite 40 = 0
  13.   set the type of sprite 43  = 0
  14.   resetpro
  15.   set thisOne = the clickon-10  -- if the players are moved relative to sprite 1 then this # must change
  16.   
  17.   resetBanner -- clear the banner status
  18.   set activeplayer =  "LoadCurrentMedia" & thisOne
  19.   do activeplayer
  20.   loadFirstvideo -- loads the first card video
  21.   TitleSound -- plays the Title sound file
  22.   cursor -1
  23.   repeat while soundbusy(1)
  24.   end repeat
  25.   controlon
  26.   set the movierate of sprite 48 = 1
  27.   puppetsound 0
  28.   makeLocalList -- used by the rollover script for the icons to display the next card
  29. end
  30.  
  31.  
  32. on LoadCurrentMedia1
  33.   set gTheBench = []
  34.   set gTheBench = getaProp(gMediaList,#player1)
  35.   loadEM
  36.   LoadIcons
  37.   
  38. end
  39.  
  40.  
  41. on LoadCurrentMedia2
  42.   set gTheBench = []
  43.   set gTheBench = getaProp(gMediaList,#player2)
  44.   loadEM
  45.   LoadIcons
  46. end
  47.  
  48.  
  49. on LoadCurrentMedia3
  50.   set gTheBench = []
  51.   set gTheBench = getaProp(gMediaList,#player3)
  52.   loadEM
  53.   LoadIcons
  54. end
  55.  
  56.  
  57. on LoadCurrentMedia4
  58.   set gTheBench = []
  59.   set gTheBench = getaProp(gMediaList,#player4)
  60.   loadEM
  61.   LoadIcons
  62. end
  63.  
  64. on LoadCurrentMedia5
  65.   set gTheBench = []
  66.   set gTheBench = getaProp(gMediaList,#player5)
  67.   loadEM
  68.   LoadIcons
  69. end
  70.  
  71. on LoadCurrentMedia6
  72.   set gTheBench = []
  73.   set gTheBench = getaProp(gMediaList,#player6)
  74.   loadEM
  75.   LoadIcons
  76. end
  77.  
  78.  
  79. ------------------    Load Cards Scripts -----------------------------------
  80. -- 7  lagrecard 
  81. -- 6 text
  82. -- 43  more button
  83. -- 44 to 46 small cards
  84. -- 47 empty
  85. -- 48 AVI file
  86.  
  87. --- loads the icons and cards
  88.  
  89. on LoadEM
  90.   --set up the sprites for the cards
  91.   -- sets up the text button for cards
  92.   repeat with x = 41 to 47
  93.     puppetsprite x,1
  94.     set the type of sprite x = 0
  95.   end repeat
  96.   
  97.   -- clear the member members used by the scrolling text card
  98.   repeat with x = 6 to 9
  99.     set the type of sprite x = 0
  100.   end repeat
  101.   
  102.   -- loads the first big card named in the property #card in the temp list gTheBench
  103.   set temp = getaprop(gthebench,#card)
  104.   set theCard = getat(temp,1)
  105.   puppetsprite 7,1
  106.   set the type of sprite 7 = the type of sprite 1
  107.   set  the scriptText of member (the number of member  theCard of castlib gXCast) = ¼
  108. The scriptText of member (the number of member  "BigCard" of castlib "SSQCST")
  109.   set the membernum of sprite 7 = the number of member  theCard of castlib gXCast
  110.   set the ink of sprite 7 = 32
  111.   set the visible of sprite 7 to 1
  112.   set the locv of sprite 7  = the locv of sprite 1-53
  113.   set the loch of sprite 7  = the loch of sprite 1+146
  114.   setat(gprompts,7,thecard)
  115.   --   sets up the text button
  116.   -- assumes that the More button was cut out of a large card so registration is the same
  117.   puppetsprite 43,1
  118.   set the type of sprite 43 = 16
  119.   set the membernum of sprite 43 = the number of member "MoreInfo" of castlib "SSQCST"
  120.   set the ink of sprite 43 = 32
  121.   set the locv of sprite 43 = the locv of sprite 1
  122.   set the loch of sprite 43 = the loch of sprite 1
  123.   set the blend of sprite 43 = 0
  124.   set the visible of sprite 43 = 1
  125.   set t = the  number  of member  "MoreInfo" of castlib "SSQCST"
  126.   set  the scriptText of member  t = the scriptText of member (the number of member  "DisplayText" of castlib "SSQCST")
  127. end
  128.  
  129.  
  130. -- LoadIcons counts and sets up the detail button and card count 
  131. -- uses puppetsprite 40 and 41 formally used by the icons
  132.  
  133. on loadIcons
  134.   puppetsprite 40,1
  135.   puppetsprite 41,1
  136.   set the membernum of sprite 40 to 0 -- clear the button incase there is only one detail card
  137.   set localList = getaprop(gTheBench,#Card)
  138.   set range = count(localList )
  139.   -- position and setup up a counterfield
  140.   put 1 && "of" &&  range into field "CardCount" of castlib "Internal"
  141.   set the forecolor of  field "CardCount" of castlib "Internal" = 0 
  142.   set the membernum of sprite 41 = the number of member  "CardCount"
  143.   set  the loc of sprite 41 = point(522,48)
  144.   set the ink of sprite 41 = 36
  145.   set the visible of sprite 41 = 1
  146.   
  147.   --position and setup a button
  148.   case range> 1 of
  149.     1:
  150.       set the membernum of sprite 40 = the number of member  "Details" of castlib "SSQCST"
  151.       set the stretch of sprite 40 = false
  152.       set  the loc of sprite 40 =  the loc of sprite 1
  153.       set the ink of sprite 40 = 36
  154.       set the blend of sprite 40 = 0  
  155.       set the visible of sprite 40 = 1   
  156.       set t = the number of member  "Details" of castlib "SSQCST"
  157.       set S = the number of member "DetailScript" of castlib "SSQCST"
  158.       set the scriptText of member t =  the scriptText of member S
  159.   end case
  160.   updateStage
  161. end
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.